create table TB_TREE_TARGET
(
  OBJ_ID        NUMBER(30) not null,
  OBJ_NAME      VARCHAR2(512) not null,
  P_OBJ_ID      NUMBER(30) not null,
  OBJ_TYPE      NUMBER(4) not null,
  OBJ_TYPE_DESC VARCHAR2(64),
  SN            NUMBER(4),
  ISVALID       NUMBER(1),
  CREATE_TIME   DATE,
  UPD_TIME      DATE
);
-- Create sequence 
create sequence TB_TREE_TARGET_SEQ
minvalue 1
maxvalue 9999999999999999999999999999
start with 410
increment by 1
cache 10;

create or replace trigger TB_TREE_TARGET_TRI
  before insert on tb_tree_target  
  for each row
declare
 
begin
  select tb_tree_target_seq.nextval into :new.OBJ_ID FROM sys.DUAL;
end TB_TREE_TARGET_TRI;
